Skip to content

compose: Show mute icon on channel detail title and align title spacing#6513

Merged
andremion merged 3 commits into
developfrom
andrerego/and-1255-channel-detail-group-info-contact-info-show-mute-icon-by-the
Jun 23, 2026
Merged

compose: Show mute icon on channel detail title and align title spacing#6513
andremion merged 3 commits into
developfrom
andrerego/and-1255-channel-detail-group-info-contact-info-show-mute-icon-by-the

Conversation

@andremion

@andremion andremion commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Goal

Align the Channel Detail title area with the new design on both the Group Info and Contact Info screens. When the chat is muted, the design shows a mute icon right after the name, and the gap between the name and the status line below it is smaller than what we ship today.

Linear: AND-1255

Implementation

  • Added a shared ChannelInfoTitle composable used by both the Group Info and Contact Info screens. It renders the name and, when the chat is muted, a trailing mute icon.
  • The mute icon uses the stream_design_ic_mute drawable at its intrinsic size (20dp, matching the design) and the primary text color. The size is not hard coded, so a drawable override resizes it.
  • Changed the gap between the title and the status line from 8dp to 4dp to match the design system.
  • Exposed the muted state as a derived property ChannelInfoViewState.Content.isMuted: the channel is muted for a group, or the channel or the other user is muted for a direct message. Both screens read this single value instead of computing it in the UI.
  • Tests: added ChannelInfoViewStateTest covering the isMuted derivation, and added Paparazzi snapshots for the muted state on both screens.

🎨 UI Changes

Group Info

Before After
Screenshot_20260623_141658 Screenshot_20260623_141728

Contact Info

Before After
Screenshot_20260623_141641 Screenshot_20260623_141738

Testing

Group Info

  1. Open a group channel and go to Group Info.
  2. Turn on "Mute Group". A mute icon appears right after the group name.
  3. Turn it off. The icon disappears.

Contact Info

  1. Open a direct message and go to Contact Info.
  2. Turn on "Mute Chat" or "Mute User". A mute icon appears right after the contact name.
  3. Turn both off. The icon disappears.

On both screens, check that the spacing between the title and the status line below it (for example "Online" or "9 members · 1 online") matches the design.

Summary by CodeRabbit

  • New Features

    • Channel info screens now display a visual mute indicator next to the channel name when the channel or user is muted.
    • Mute state information is now exposed and tracked in channel info view data.
  • Tests

    • Added comprehensive tests covering muted channel and user state scenarios in channel info screens.

Add a trailing mute icon next to the name on the Group Info and Contact
Info screens when the chat is muted, matching the design system. Tighten
the gap between the title and the status line from 8dp to 4dp.

Extract a shared ChannelInfoTitle composable used by both screens. The
muted state is derived from the channel info options: MuteChannel for a
group, MuteChannel or MuteUser for a direct message. The icon uses the
drawable's intrinsic size so a drawable override resizes it.
Expose ChannelInfoViewState.Content.isMuted as a property derived from
the mute options (channel muted for a group, channel or other user muted
for a direct message). The Group Info and Contact Info screens read this
instead of scanning the options in composition, keeping the rule in one
place on the view state.
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@andremion andremion added the pr:improvement Improvement label Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.90 MB 5.90 MB 0.00 MB 🟢
stream-chat-android-ui-components 11.15 MB 11.15 MB 0.00 MB 🟢
stream-chat-android-compose 12.61 MB 12.61 MB 0.00 MB 🟢

@andremion

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds an isMuted computed boolean to ChannelInfoViewState.Content, derived from active MuteChannel/MuteUser options. Introduces a shared ChannelInfoTitle composable that renders a mute icon when muted. Threads isMuted through avatar container params, the component factory, and both direct and group channel info avatar headers.

Changes

Mute state in channel info screens

Layer / File(s) Summary
isMuted view state property
stream-chat-android-ui-common/src/main/kotlin/.../ChannelInfoViewState.kt, stream-chat-android-ui-common/api/stream-chat-android-ui-common.api, stream-chat-android-ui-common/src/test/kotlin/.../ChannelInfoViewStateTest.kt
Adds isMuted: Boolean to ChannelInfoViewState.Content, computed by scanning options for enabled MuteChannel or MuteUser entries. Exposed in the public API and covered by parameterized unit tests for all mute-option combinations.
Shared ChannelInfoTitle composable
stream-chat-android-compose/src/main/java/.../channel/info/ChannelInfoScreenDefaults.kt
New internal composable renders an ellipsized single-line title in a Row and conditionally appends a mute Icon with localized content description when isMuted is true.
Avatar container params + factory wiring
stream-chat-android-compose/src/main/java/.../theme/ChatComponentFactoryParams.kt, stream-chat-android-compose/src/main/java/.../theme/ChatComponentFactory.kt, stream-chat-android-compose/api/stream-chat-android-compose.api
Adds isMuted: Boolean = false to DirectChannelInfoAvatarContainerParams and GroupChannelInfoAvatarContainerParams. The default ChatComponentFactory implementations forward params.isMuted to the underlying avatar container composables. Public API surface updated accordingly.
Direct channel info screen + snapshot tests
stream-chat-android-compose/src/main/java/.../channel/info/DirectChannelInfoScreen.kt, stream-chat-android-compose/src/test/kotlin/.../channel/info/DirectChannelInfoContentTest.kt
DirectChannelInfoAvatarContainer gains an isMuted parameter and delegates title rendering to ChannelInfoTitle. Call site passes content.isMuted. Preview overload updated to accept isChannelMuted/isUserMuted; two new muted-state preview composables added. Four Paparazzi snapshot tests cover channel-muted and user-muted states in light/dark mode.
Group channel info screen
stream-chat-android-compose/src/main/java/.../channel/info/GroupChannelInfoScreen.kt
GroupChannelInfoAvatarContainer gains isMuted: Boolean and replaces the inline Text title with ChannelInfoTitle(isMuted). The call site passes content.isMuted.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • GetStream/stream-chat-android#6470: Adds Option.MuteChannel ("Mute Conversation") to the DM channel info option list, which is the upstream source of the MuteChannel option that this PR's isMuted computation reads from.

Suggested reviewers

  • VelikovPetar

Poem

🐰 A mute icon hops into view,
When the channel is hushed, it rings true.
isMuted computed with care,
A little bell crossed—handle with flair!
No more guessing if silence was set—
The bunny has wired the best UI yet. 🔕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.65% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: displaying a mute icon on the channel detail title and adjusting title spacing, which aligns with the PR's primary objectives.
Description check ✅ Passed The PR description comprehensively covers all required sections: Goal, Implementation, UI Changes with before/after screenshots, detailed Testing instructions, and KDoc/documentation updates mentioned. All critical sections are complete and well-documented.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch andrerego/and-1255-channel-detail-group-info-contact-info-show-mute-icon-by-the

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewStateTest.kt`:
- Around line 28-30: The parameterized test display-name placeholder in the
isMutedArguments method source is incorrect. The display name pattern "isMuted
is {1} when {0}" references a second argument with {1}, but the isMutedArguments
source method only provides a single argument (testData: IsMutedTestData) via
Arguments.of(testData). Fix this by updating the display name pattern in the
`@ParameterizedTest` annotation to use only {0}, which will resolve to the string
representation of the IsMutedTestData object (the description).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8aac450d-5f8d-49ca-a061-01a1b61d784f

📥 Commits

Reviewing files that changed from the base of the PR and between 7f08db1 and a1b887f.

⛔ Files ignored due to path filters (10)
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_channel_muted_content.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_channel_muted_content_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_content.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_content_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_user_muted_content.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_DirectChannelInfoContentTest_user_muted_content_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members_in_dark_mode.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_expanded_members.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_expanded_members_in_dark_mode.png is excluded by !**/*.png
📒 Files selected for processing (10)
  • stream-chat-android-compose/api/stream-chat-android-compose.api
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoScreenDefaults.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/DirectChannelInfoScreen.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelInfoScreen.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/channel/info/DirectChannelInfoContentTest.kt
  • stream-chat-android-ui-common/api/stream-chat-android-ui-common.api
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.kt
  • stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewStateTest.kt

The test name referenced {1}, but each case passes a single argument, so
the placeholder rendered literally. Fold the expected value into the test
data toString and use {0} for a readable name.
@andremion andremion marked this pull request as ready for review June 23, 2026 13:53
@andremion andremion requested a review from a team as a code owner June 23, 2026 13:53
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
77.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@andremion andremion merged commit fd47cc3 into develop Jun 23, 2026
18 of 19 checks passed
@andremion andremion deleted the andrerego/and-1255-channel-detail-group-info-contact-info-show-mute-icon-by-the branch June 23, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:improvement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants